1. Field of the Invention
The present invention relates to a controller for an electric motor.
2. Description of the Related Art
In a machine tool for machining an object to be processed (i.e., a workpiece) into a contour shape having a noncircular cross section, such as a cam grinding machine, a piston lathe, etc., it is known that an electric motor, as a drive source for feeding the workpiece or a tool, is controlled on the basis of a target-position command commanding superimposed-type motion, including repetitive motion, in accordance with a machining program. For example, the cam grinding machine grinds a cam surface having a noncircular contour on the outer periphery of the workpiece, while continuously rotating, on a rotation control axis, a work spindle holding the workpiece, and simultaneously reciprocating, on a linear control axis, a grinding head having a grinding wheel mounted thereon and rotating at high speed, in synchronization with the rotation of the work spindle. In this connection, in order to grind the cam surface into a predetermined dimension, it is necessary to operate the grinding wheel so as to accomplish a depth-setting cut to a predetermined depth on the workpiece. Thus, in the cam grinding process, the motion of the grinding head on the linear control axis is defined as superimposed-type motion, in which the cutting or depth-setting operation for ensuring the desired dimension of the cam surface is superimposed on the reciprocating operation as simple repetitive (or iterative) motion corresponding to the shape of the cam surface. Therefore, a control unit (or controller) provided for the cam grinding machine (e.g., an NC unit) controls the electric motor as a linear drive source of the grinding head, based on a target-position command commanding the superimposed-type motion in which the cutting or depth-setting operation is superimposed on the reciprocating operation (or the repetitive motion).
In the cam grinding machine described above, it is a precondition for achieving the highly precise machining of the cam surface that the rotation of the work spindle is accurately synchronized with the superimposed-type linear motion of the grinding head. To this end, there has been conventionally proposed a method for controlling an electric motor, in which machining errors caused due to the error in synchronization of the rotation of the work spindle and the linear motion of the grinding head can be reduced as much as possible by a learning control (e.g., see Japanese Unexamined Patent Publication (kokai) No. 9-212218 (JP-A-9-212218)). In the control method shown in JP-A-9-212218, based on a positional deviation between a target-position command commanded to an electric motor as the drive source of the grinding head and an actual positional fed-back variable obtained from the grinding head, the learning control is performed so as to correct the target-position command that is to be commanded in a subsequent control cycle. In this connection, the controller is configured to store data relating to the positional deviation in a first storage area referencing a rotation angle of the spindle and a second storage area referencing a movement position of the grinding head, and to correct the target-position command based on these two types of the positional deviation data. According to this configuration, an influence of a torque ripple arising during the rotation of the electric motor can be eliminated and the learning control can be performed appropriately.
Also, as a related art, Japanese Unexamined Patent Publication (Kokai) No. 6-343284 (JP-A-6-343284) discloses a technique, in a control of an AC servomotor, for eliminating an influence of a cogging torque (or a torque ripple) by a learning control. The controller disclosed in JP-A-6-343284 is configured to store a positional deviation between a position input and a rotating position for every rotating position and, by using an input-current compensation value (i.e., learning data) calculated based on the stored positional deviation, repeatedly compensate for an input current. As a result, the cogging torque of the servomotor can be compensated, regardless of a rotation speed. Further, the controller is configured to separately store and learn a first rotating-position deviation depending on the rotating position of the servomotor and a second rotating-position deviation depending on the rotating position and the input current of the servomotor. Therefore, even when a torque fluctuation component depending on only the rotating position and a torque fluctuation component depending on both the rotating position and the input current are included mixedly in the cogging torque, the both of the fluctuation components can be compensated completely.
In the cam grinding machine described above, the motion of the grinding head is typically controlled in such a manner as to make the grinding wheel accomplish a depth-setting cut ensuring a gradually reduced cutting depth so as to sequentially carry out a rough grinding, a fine grinding and a spark-out grinding during one machining cycle, for the purpose of precisely machining a cam surface into a predetermined dimension. In this process, the electric motor as a drive source for the grinding head is controlled on the basis of a target-position command including both a positional component indicating a reciprocating operation as a simple repetitive motion and a positional component indicating a cutting or depth-setting operation by a gradually changing feed rate. In this configuration, the repeatability of the target-position command is lost due to a change in the cutting or depth-setting operation, so that if a typical learning control is performed according to a certain learning period defined by, for example, a rotation angle of the electric motor driving the grinding head, which corresponds to a single revolution of the work spindle (i.e., a rotation angle required for a single reciprocating motion of the grinding head), the positional deviation increases at an instant when the cutting or depth-setting operation changes and, as a result, it becomes difficult to quickly bring the positional deviation into convergence.
On the other hand, in some applications, such as, for example, a toothed-wheel grinding process, the grinding head is controlled in such a manner as to make the grinding wheel continuously accomplish a depth-setting cut ensuring a constant cutting depth during one machining cycle. In this case, a target-position command given to the electric motor driving the grinding head includes a positional component indicating a reciprocating operation as a simple repetitive motion and a positional component indicating a cutting or depth-setting operation by a constant feed rate, and thus the repeatability of the command is maintained. Therefore, when the typical learning control is performed according to the learning period defined by the rotation angle corresponding to the single revolution of the work spindle, it is possible to bring the positional deviation into convergence. However, also in this configuration, if a certain disturbance is applied to the electric motor in a periodic manner according to a period deviating from the learning period, it is difficult for the learning control to bring the disturbance into convergence. For example, the torque ripple inevitably caused by the structure of the electric motor arises at timing shifted correspondingly to the cutting or depth-setting operation at every reciprocating operation, during the operation of the motor for the superimposed-type motion including the reciprocating operation and the cutting or depth-setting operation, so that it is difficult, for the learning control performed according to the learning period defined by the single revolution of the work spindle, to bring the positional deviation resulted from the torque ripple into convergence.
The conventional learning control methods, as described in JP-A-9-212218 and JP-A-6-343284, are not configured to bring a positional deviation into convergence, which tends to increase at an instant when the repeatability of the target-position command is lost in a case where the electric motor is controlled based on the target-position command with no repeatability, such as a linear-motion control for a grinding head in a cam grinding machine, involving a change in a cutting or depth-setting operation. In this connection, a configuration, such that an electric motor is controlled based on a target-position command including both a positional component indicating a simple repetitive motion and a positional component indicating a gradually changing feed rate, is frequently used not only in the cam grinding process but also in several processes for machining a workpiece into a contour shape having a noncircular cross section, such as a polygon grinding process, a piston turning process, etc. However, neither of the learning control methods of JP-A-9-212218 and JP-A-6-343284 considers such versatility. In particular, the learning control method of JP-A-9-212218 can bring the torque ripple in the electric motor into convergence, which arises at timing shifted correspondingly to the cutting or depth-setting operation at every reciprocating operation of the grinding head in the cam grinding machine, but it cannot be applied to machining processes other than the cam grinding process and to a compensation for a disturbance other than the torque ripple.